<%--
  Created by IntelliJ IDEA.
  User: 张皓然
  Date: 2019/4/24
  Time: 21:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <%@include file="/WEB-INF/jspf/meta/meta.jspf"%>
    <title>课程表主体</title>
    <%@include file="/WEB-INF/jspf/adminPage.jspf"%>
    <script type="text/javascript">
    </script>
</head>
<body>

    <!-- 显示信息表格 -->
    <table id="dg_course1" class="easyui-datagrid" pagination="true"
       pageList="[5,10,50,100,200,300,500]" pageSize="5"
       data-options="
                    fit:true
                    ,url:'<%=request.getContextPath()%>/course/list1.json'
                    ,fitColumns:false
                    ,singleSelect:true
                    ,toolbar:'#tb'						<%--数据网格(DataGrid)面板的头部工具栏--%>
                    ,onRowContextMenu:f_contextMenu_course1		<%--鼠标右键事件  ,onRowContextMenu:f_contextMenu_grade --%>
                    ">
        <thead>
       	<tr>
        	<th data-options="field:'course1Id',width:200" checkbox='true' >课程表主键</th>
        	<th data-options="field:'gradeId',width:150,align:'center',formatter: function(value,row,index){return row.gradeName}">班级名称</th>
	        <th data-options="field:'course1Start',width:130,align:'center'">开始时间</th>
	        <th data-options="field:'course1End',width:130,align:'center'">结束时间</th>
	        <th data-options="field:'course1Info',width:300,align:'center',fixed:true">备注</th>
		</tr>
        </thead>
    </table>

    <!-- 工具栏使用 -->
    <div id="tb" style="padding: 5px; height: auto">
        <div>
            <a href="#" class="easyui-linkbutton"  iconCls="icon-remove" onclick="$('#dlg_course_dell').dialog('open')">删除</a>
            &nbsp;&nbsp;&nbsp;  <%-- 占位符 --%>
            <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="f_courseOpenUpdateView()">修改</a>
            &nbsp;&nbsp;&nbsp;  <%-- 占位符 --%>
            <a href="#" class="easyui-linkbutton" iconCls="icon-search"   onclick="f_common_condition('Course1','finallyDoFunction')">查询</a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="f_course1_oneDetail()">明细</a>
        </div>
    </div>
    
    <!--DataGrid行 右键菜单
		菜单入口 function f_contextMenu_subject()
	-->
	<%@include file="/WEB-INF/jsp/course/_menuGrid.jspf"%>
	
	<!-- 删除对话框架 及后台数据处理
	 "$('#dlg_course_dell').dialog('open')  打开对话框架 
	 "$('#dlg_course_dell').dialog('close') 关闭对话框架 
	-->
	<%@include file="/WEB-INF/jsp/course/_dell.jspf"%>
	
	<!--明细
		启动入口 function f_subject_oneDetail()
	-->
	<%@include file="/WEB-INF/jsp/course/_oneDetail.jspf"%>
	
	<!--下载明细
		启动入口 function f_coursedownExcel()
	-->
	<%@include file="/WEB-INF/jsp/course/_downExcel.jspf"%>
	
	<!--打开修改视图
		启动入口 function f_courseOpenUpdateView()
	-->
	<%@include file="/WEB-INF/jsp/course/_update.jspf"%>
	
	<!--条件模型
					key ：模块标识符，finallyDoFunction：对接父页面的函数。
		启动入口 function f_common_condition(key,finallyDoFunction) 
	-->
	<%@include file="/WEB-INF/jsp/_condition/_condition.jspf"%>
	
	<script type="text/javascript">
		//子页面接口。子页面处理后的结果，会从此方法传入
		function finallyDoFunction(data){
			$('#dg_course1').datagrid({queryParams:{whereSql:data}});//把子页面传来的参数，放到父（当前）页面中的容器来
		}
	</script>
</body>
</html>
